#include "behavior_tree_reactive_fallback_policy.h"
#include <behaviortree_cpp_v3/controls/reactive_fallback.h>

namespace policy
{
BehaviorTreeReactiveFallbackPolicy::BehaviorTreeReactiveFallbackPolicy(const std::string &name)
    : BehaviorTreePolicy(name)
{
    policy_tree_node_ = std::make_unique<BT::ReactiveFallback>(name + "_reactive_fallback_node");
}
bool BehaviorTreeReactiveFallbackPolicy::setReactiveTask(const task::AbstractTaskConstPtr &task)
{
    return BehaviorTreePolicy::insertTask(0, task);
}
bool BehaviorTreeReactiveFallbackPolicy::setReactivePolicy(const AbstractPolicyConstPtr &policy)
{
    return BehaviorTreePolicy::insertPolicy(0, policy);
}
BehaviorTreeReactiveFallbackPolicy::~BehaviorTreeReactiveFallbackPolicy() = default;
}
